package com.chushouya.manager.service.common;

import com.alipay.api.domain.*;
import com.alipay.api.response.*;

import java.math.BigDecimal;
import java.util.List;

public interface AlipayClientCommonService {

    /**
     * 创建支付宝钱包
     */
    void alipayFundWalletTemplateCreate(String orderNo);

    /**
     * 确认开通商户钱包业务
     */
    void alipayFundWalletTemplateConfirm();

    /**
     * 钱包关闭
     */
    void closeFundWallet(String userWalletId);

    /**
     * 钱包资金原路退
     */
    AlipayFundWalletRefundResponse refundFundWallet(String outBizNo, BigDecimal amount, String userWalletId);

    /**
     * 钱包资金提现
     */
    AlipayFundWalletWithdrawResponse withdrawFundWallet(String outBizNo, BigDecimal amount, String userWalletId);

    /**
     * 钱包资金查询
     */

    AlipayFundWalletConsultResponse queryFundWallet(String userWalletId);


    /**
     * 获取钱包开通连接
     */
    AlipayFundWalletTokenCreateResponse createWalletOpenUrl(String outBizNo,String openId);

    /**
     * 小程序发送模板消息
     * 
     * @param toUserId 接收模板消息的用户user_id
     * @param formId 用户提交的表单id
     * @param userTemplateId 小程序模板ID
     * @param page 点击模板消息跳转的页面，不填则无跳转
     * @param data 模板消息内容的数据
     * @return AlipayOpenAppMiniTemplatemessageSendResponse
     */
    AlipayOpenAppMiniTemplatemessageSendResponse sendMiniTemplateMessage(String toUserId, String userTemplateId, String page, String data);
    /**
     * 用户充值创建订单 alipay.fund.wallet.depositorder.create
     */
    String alipayFundWalletDepositOrderCreate(String outBizNo, String amount, String userWalletId);

    /**
     * alipay.fund.trans.app.pay(现金红包无线支付接口)
     */
    String alipayFundTransAppPay(String outBizNo, String amount, String orderId);


    /**
     * 单笔转账到支付宝账户接口
     *
     * @param outBizNo     商户转账唯一订单号
     * @param transAmount  转账金额，单位：元
     * @param orderTitle   转账标题
     * @param identity     收款方的支付宝唯一用户号（2088开头的16位纯数字）
     * @param identityType 收款方标识类型，目前只支持ALIPAY_USERID
     * @param name         收款方真实姓名
     */
    AlipayFundTransUniTransferResponse fundTransUniTransfer(String outBizNo, String transAmount, String orderTitle, String remark, String identity, String identityType, String name);

    /**
     * 创建支付订单
     */

    String alipayTradeWapPay(String appId, String orderNo, BigDecimal completePrice, String subject, String notifyUrl, String returnUrl);

    /**
     * 生成支付宝小程序二维码
     */
    AlipayOpenAppQrcodeCreateResponse alipayOpenAppQrcodeCreate(String urlParam, String queryParam, String size, String describe);

    /**
     * 钱包交易扣款
     */
    AlipayTradePayResponse walletAlipayTradePay(String smId,String outTradeNo, BigDecimal amount, String agreementNo);

    /**
     * 统一收单交易创建接口
     */
    String alipayTradeCreate(String orderNo,String openId, String totalAmount, String subject,List<GoodsDetail> goodsList);

    /**
     * 上传图片到支付宝
     */
    String alipayOpenFileUpload(String imageUrl);

    /**
     * 支付宝质检信息
     */
    void alipayCommerceRecycleQcreportUpload(AlipayCommerceRecycleQcreportUploadModel model);

    /**
     * 支付宝小程序订单创建
     */
    AlipayOpenMiniOrderCreateResponse alipayOpenMiniOrderCreate(AlipayOpenMiniOrderCreateModel model);

    /**
     * 支付宝小程序订单发货
     */
    void alipayOpenMiniOrderDeliverySend(AlipayOpenMiniOrderDeliverySendModel model);

    /**
     * 支付宝小程序订单收货
     */
    void alipayOpenMiniOrderDeliveryReceive(AlipayOpenMiniOrderDeliveryReceiveModel model);

    /**
     * 支付宝小程序上门时间修改
     */
    AlipayOpenMiniOrderDeliveryModifyResponse alipayOpenMiniOrderDeliveryModify(AlipayOpenMiniOrderDeliveryModifyModel model);

    /**
     * 同步售后信息
     * @param model
     */

    void alipayOpenMiniOrderAftersaleSync(AlipayOpenMiniOrderAftersaleSyncModel model);
    /**
     * 支付宝小程序订单关闭
     */
    void alipayOpenMiniOrderClose(AlipayOpenMiniOrderCloseModel alipayOpenMiniOrderCloseModel);

    /**
     * 查询支付宝小程序订单
     */
    AlipayOpenMiniOrderQueryResponse alipayOpenMiniOrderQuery(String orderNo, String openId);

    /**
     * 创建蚂蚁门店
     */
    AntMerchantExpandShopCreateResponse antMerchantExpandShopCreate(AntMerchantExpandShopCreateModel model);

    /**
     * 修改蚂蚁门店
     */
    AntMerchantExpandShopModifyResponse antMerchantExpandShopModify(AntMerchantExpandShopModifyModel model);
    /**
     * 二级回收商代扣关系维护
     */
    AlipayCommerceRecycleDeductRelationSaveResponse alipayCommerceRecycleDeductRelationSave(AlipayCommerceRecycleDeductRelationSaveModel model);

    /**
     * 维护回收平台下游分账关系
     */
    AlipayCommerceRecycleRoyaltyRelationSaveResponse alipayCommerceRecycleRoyaltyRelationSave(AlipayCommerceRecycleRoyaltyRelationSaveModel model);

    /**
     * 查询回收平台绑定的代扣关系
     */
    AlipayCommerceRecycleDeductRelationQueryResponse alipayCommerceRecycleDeductRelationQuery(AlipayCommerceRecycleDeductRelationQueryModel model);

    /**
     * 查询回收平台绑定的分账关系(批量)
     */
    AlipayCommerceRecycleRoyaltyRelationQueryResponse alipayCommerceRecycleRoyaltyRelationQuery(AlipayCommerceRecycleRoyaltyRelationQueryModel model);

    AlipayFundWalletConsultResponse userWalletConsult(String userWalletId);

    /**
     * alipay.commerce.recycle.order.pre.check 订单确认预校验
     */
    AlipayCommerceRecycleOrderPreCheckResponse alipayCommerceRecycleOrderPreCheck(AlipayCommerceRecycleOrderPreCheckModel model);


    /**
     * alipay.commerce.recycle.order.merchant.confirm(回收商户质检报价)
     */
    void alipayCommerceRecycleOrderMerchantConfirm(AlipayCommerceRecycleOrderMerchantConfirmModel model);


    AlipayCommerceRecycleInstshopQrcodeConsultResponse alipayCommerceRecycleInstshopQrcodeConsult(String alipayShopId);

    void alipayFundWalletWithdraw(String outBizNo, String amount, String userWalletId);
}
